package com.example.consumerrabbitmq.listener;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
/**
 * @description: 监听主题
 * @author: WangBlue
 * @create: 2023-11-24 21:22
 **/

public class SpringQueueListener implements MessageListener {
    @Override
    public void onMessage(Message message) {
        //打印消息
        System.out.println(new String(message.getBody()));
    }
}

